oracle.pgx.common.types

## Enum PropertyType

- java.lang.Object
- - java.lang.Enum<PropertyType>
  - - oracle.pgx.common.types.PropertyType

- All Implemented Interfaces:
    Serializable, Comparable<PropertyType>, Type

      public enum PropertyType
      extends Enum<PropertyType>
      implements Type

  All supported graph property types.

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant and Description
    `BOOLEAN` Boolean type for properties
    `DATE` Date type for properties
    `DOUBLE` Double type for properties
    `EDGE` Edge type for properties
    `FLOAT` Float type for properties
    `INTEGER` Integer type for properties
    `LONG` Long type for properties
    `LONG_SET` Long set type for properties
    `RO_STRING_SET` String set type for properties
    `SPARSE` Sparse type for properties
    `STRING` String type for properties
    `VERTEX` Node type for properties

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static SimpleDateFormat` | `DEFAULT_DATE_FORMAT` Date format that is used to parse DATE objects

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static String` | `formatDate(Date obj)` Format a Date instance, using the `DEFAULT_DATE_FORMAT`.
    `Object` | `getDefaultValue()` Returns the default value that was used to create this PropertyType.
    `Class<?>` | `getTypeClass()` Gets the type class.
    `static PropertyType` | `getTypeFor(Class<?> typeClass)` Returns the PropertyType based on a typeClass.
    `boolean` | `isNodeOrEdge()` Returns true if this PropertyType is an edge or node type.
    `boolean` | `isNumericType()` Returns true if this PropertyType is a numeric type.
    `static boolean` | `parseBoolean(String input)` Parse boolean value from a string input.
    `static Date` | `parseDate(String input)` Parse a string as Date, using the `DEFAULT_DATE_FORMAT`.
    `static PropertyType` | `parsePropertyType(String input)` Parse PropertyType from a string value.
    `String` | `toKey()` Returns the key of this type as string.
    `String` | `toString()` Returns the key of this type as string.
    `static PropertyType` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
    `static PropertyType[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

    - ### Methods inherited from class java.lang.Enum

      `compareTo, equals, getDeclaringClass, hashCode, name, ordinal, valueOf`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### BOOLEAN

          public static final PropertyType BOOLEAN

      Boolean type for properties

    - #### DATE

          public static final PropertyType DATE

      Date type for properties

    - #### DOUBLE

          public static final PropertyType DOUBLE

      Double type for properties

    - #### EDGE

          public static final PropertyType EDGE

      Edge type for properties

    - #### FLOAT

          public static final PropertyType FLOAT

      Float type for properties

    - #### INTEGER

          public static final PropertyType INTEGER

      Integer type for properties

    - #### LONG

          public static final PropertyType LONG

      Long type for properties

    - #### LONG_SET

          public static final PropertyType LONG_SET

      Long set type for properties

    - #### RO_STRING_SET

          public static final PropertyType RO_STRING_SET

      String set type for properties

    - #### SPARSE

          public static final PropertyType SPARSE

      Sparse type for properties

    - #### STRING

          public static final PropertyType STRING

      String type for properties

    - #### VERTEX

          public static final PropertyType VERTEX

      Node type for properties

  - ### Field Detail

    - #### DEFAULT_DATE_FORMAT

          public static final SimpleDateFormat DEFAULT_DATE_FORMAT

      Date format that is used to parse DATE objects

  - ### Method Detail

    - #### formatDate

          public static String formatDate(Date obj)

      Format a Date instance, using the `DEFAULT_DATE_FORMAT`.
      Parameters:
        `obj` - Date instance to format.
      Returns:
        A string that represents the input date.

    - #### getDefaultValue

          public Object getDefaultValue()

      Returns the default value that was used to create this PropertyType.
      Returns:
        the default value that was used to create this PropertyType.

    - #### getTypeClass

          public Class<?> getTypeClass()

      Description copied from interface: `Type`
      Gets the type class.
      Specified by:
        `getTypeClass` in interface `Type`
      Returns:
        the Java class this type maps to

    - #### getTypeFor

          public static PropertyType getTypeFor(Class<?> typeClass)

      Returns the PropertyType based on a typeClass.
      Parameters:
        `typeClass` - Use this typeClass to derive the PropertyType
      Returns:
        The PropertyType that belongs to this typeClass

    - #### isNodeOrEdge

          public boolean isNodeOrEdge()

      Returns true if this PropertyType is an edge or node type.
      Returns:
        true if this PropertyType is an edge or node type.

    - #### isNumericType

          public boolean isNumericType()

      Returns true if this PropertyType is a numeric type.
      Returns:
        true if this PropertyType is a numeric type.

    - #### parseBoolean

          public static boolean parseBoolean(String input)

      Parse boolean value from a string input.
      Parameters:
        `input` - String value to parse as boolean.
      Returns:
        A boolean value that was parsed from the input.

    - #### parseDate

          public static Date parseDate(String input)
                                throws GmParseException

      Parse a string as Date, using the `DEFAULT_DATE_FORMAT`.
      Parameters:
        `input` - String value to parse as Date.
      Returns:
        An instance of Date, parsed from the input string.
      Throws:
        `GmParseException`

    - #### parsePropertyType

          public static PropertyType parsePropertyType(String input)

      Parse PropertyType from a string value.
      Parameters:
        `input` - Value to use to parse a PropertyType from. You can use the output of `toString()` as input.
      Returns:
        The PropertyType derived from the string input.

    - #### toKey

          public String toKey()

      Description copied from interface: `Type`
      Returns the key of this type as string.
      Specified by:
        `toKey` in interface `Type`
      Returns:
        a JSON string representation of this type

    - #### toString

          public String toString()

      Returns the key of this type as string. See `toKey()`.
      Overrides:
        `toString` in class `Enum<PropertyType>`
      Returns:
        the String representation of this type, which is the enum key.

    - #### valueOf

          public static PropertyType valueOf(String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
        `name` - the name of the enum constant to be returned.
      Returns:
        the enum constant with the specified name
      Throws:
        `IllegalArgumentException` - if this enum type has no constant with the specified name
        `NullPointerException` - if the argument is null

    - #### values

          public static PropertyType[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (PropertyType c : PropertyType.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

Copyright © 2015. All rights reserved.